@import '../../../style/common/index.less';
@import './reset.less';

.placeholder(@color: @input-placeholder-color) {
  // Firefox
  &::-moz-placeholder {
    opacity: 1; // Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526
  }

  &::placeholder {
    color: @color;
  }

  &:placeholder-shown {
    text-overflow: ellipsis;
  }
}

.@{timepicker-prefix-cls} {
  position: relative;
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  margin: 0;
  margin-bottom: 12px;
  padding: 4px 11px;
  list-style: none;
  background: #fff;
  border: 1px solid #d9d9d9;
  border-radius: 2px;
  transition: border 0.3s, box-shadow 0.3s;

  &:hover {
    border-color: @info-hover;
    border-right-width: 1px;
  }

  &-focused {
    border-color: @info-active;
  }

  &-input {
    position: relative;
    display: inline-flex;
    align-items: center;
    width: 100%;

    > input {
      position: relative;
      display: inline-block;
      flex: auto;
      width: 100%;
      min-width: 0;
      min-width: 1px;
      height: auto;
      padding: 0;
      color: #000000d9;
      font-size: 14px;
      font-variant: tabular-nums;
      line-height: 1.5715;
      background: 0 0;
      border: 0;
      border-radius: 2px;
      outline: 0;
      transition: all 0.3s;
      font-feature-settings: 'tnum';
      .placeholder();
    }

    &-placeholder {
      > input {
        color: @input-placeholder-color;
      }
    }
  }

  &-clear {
    position: absolute;
    top: 0;
    right: 4px;
    cursor: pointer;

    &-btn::after {
      content: '×';
    }
  }
}

.@{timepicker-suffix-cls} {
  margin-left: @space-8;

  &-anticon {
    color: inherit;
    user-select: none;
    pointer-events: none;
  }
}

.@{pickerpanel-wrapper-cls} {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
}

.@{pickerpanel-dropdown-cls} {
  position: absolute;
  top: -9999px;
  left: -9999px;
  z-index: 100;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  color: #000000d9;
  font-size: 14px;
  font-variant: tabular-nums;
  line-height: 1.5715;
  list-style: none;
  font-feature-settings: 'tnum';

  &-container {
    overflow: hidden;
    vertical-align: top;
    background: #fff;
    border-radius: 2px;
    box-shadow: 0 3px 6px -4px #0000001f, 0 6px 16px #00000014, 0 9px 28px 8px #0000000d;
    transition: margin 0.3s;
  }
}
